package ensemble.samples.controls

import ensemble.FixSizeSample
import net.oschina.oldpig.snout.FxBuilder
import javafx.scene.control.ChoiceBox

class ChoiceBoxSampleS extends FixSizeSample(150, 100) {

  import FxBuilder._

  val box = is[ChoiceBox[String]]

  override def content = choiceBox[String](
      items := Seq("Dog", "Cat", "Horse")
    ) as box

  override def onInit():Unit = {
    super.init()
    box.getSelectionModel.selectFirst()
  }
}
